<?php
/**
 * Exception
 * - Base class of exception
 * @author Nguyen Thanh Quyen
 * @since 1.0 - 28-04-2009
 * @copyright Copyright &copy; 2009, Runsystem 
 */
abstract class Exception {                    
	protected $message = 'Unknown exception';
    protected $code;
    protected $file;
    protected $line;

    abstract function __construct($message = null, $code = 0);

    final function getMessage() {
    	return $this->message;
    }
    
    final function getCode() {
    	return $this->code;
    }
    
    final public function getFile() {
    	return $this->file;
    }
    
    final public function getLine() {
    	return $this->line;
    }
    
/*  final function getTrace();                  // an array of the backtrace()
    final function getTraceAsString();          // formated string of trace
*/
    abstract function __toString();
}
?> 
